//
// 嗨~ o(*￣▽￣*)ブ
// Created by Mokou on 2020/7/17.
//

/**
 * 素材
 * */
@interface ElecMaterial : NSObject

@property (nonatomic, copy) NSString *id;
@property (nonatomic, assign) int type;
@property (nonatomic, copy) NSString *name;

/**
 * content根据type内容不同
 * 文本型为文本内容
 * 视频、图片型为[相对]路径
 * */
@property (nonatomic, copy) NSString *content;

@property (nonatomic, copy) NSString *md5;
@property (nonatomic, assign) long long size;
@property (nonatomic, assign) long long createtime;
@property (nonatomic, assign) long long duration;

//tmp
@property (nonatomic, copy) NSString *absolutePath;

- (instancetype)init:(NSDictionary *)data;
- (NSDictionary *)getDict;
- (BOOL)typeHasFile;

+ (NSDictionary *)insert:(NSDictionary *)data;
+ (void)delete:(NSDictionary *)data;
+ (NSDictionary *)update:(NSDictionary *)data;
+ (void)order:(NSDictionary *)data;
+ (NSDictionary *)select:(NSDictionary *)data;

@end